import { createRouter, createWebHistory } from 'vue-router'
import HomeView from '../views/HomeView.vue'
import RegisterView from '../views/RegisterView.vue' 

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      name: 'home',
      component: HomeView
    },
    {
      path: '/register', 
      name: 'register',
      component: RegisterView
    },
    {
      path: '/upload',
      name: 'upload',
      component: () => import('../views/UploadView.vue')
    },
    // 新增 RootView 路由配置
    {
      path: '/root',
      name: 'root',
      component: () => import('../views/RootView.vue')
    },
    // 新增 UserView 路由配置
    {
      path: '/user',
      name: 'user',
      component: () => import('../views/UserView.vue')
    },
    
  ]
})

export default router